package edu.cmu.cs.webapp.ioms.perspectives;

import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;

import edu.cmu.cs.webapp.ioms.views.IngredientInfoView;
import edu.cmu.cs.webapp.ioms.views.IngredientListView;
import edu.cmu.cs.webapp.ioms.views.InventoryView;
import edu.cmu.cs.webapp.ioms.views.OrdersListView;
import edu.cmu.cs.webapp.ioms.views.ProductView;

public class ProductManagementPerspective implements IPerspectiveFactory {

	// TODO Auto-generated method stub

	public static final String PERSPECTIVE_ID = "edu.cmu.cs.webapp.ioms.perspectives.productManagement";

	public void createInitialLayout(IPageLayout layout) {
		layout.setEditorAreaVisible(false);


		// create top folder(placeholder)
		IFolderLayout topFolder = layout.createFolder("topFolder",
				IPageLayout.LEFT | IPageLayout.LEFT,
				new Float(0.515).floatValue(), IPageLayout.ID_EDITOR_AREA);

		
		
//		this should display the picture of the product
		/*IFolderLayout bottomFolder = layout.createFolder("bottomFolder",
				IPageLayout.RIGHT | IPageLayout.TOP, new Float(0.50)
						.floatValue(), IPageLayout.ID_EDITOR_AREA);*/
		
		IFolderLayout rightFolder = layout.createFolder("rightFolder",
				IPageLayout.RIGHT | IPageLayout.RIGHT, new Float(0.50)
						.floatValue(), IPageLayout.ID_EDITOR_AREA);
		

	
		// add product list view to the top folder
		topFolder.addView(ProductView.ID_VIEW);
		rightFolder.addView(IngredientListView.ID_VIEW);
		rightFolder.addView(IngredientInfoView.ID_VIEW);
		
	/*	bottomFolder.addView(ProductView.ID_VIEW);*/
	/*	bottomFolder.addView(ProductView.ID_VIEW);*/
		//rightFolder.addView(DescrView.ID_VIEW);
//		rightFolder.addView(FormulaView.ID_VIEW);
	

		layout.getViewLayout(ProductView.ID_VIEW).setCloseable(false);
	
	}

}
